# Maintainer: omni <omni+alpine@hack.org>
pkgname=py3-rfc3986
_pkgname=rfc3986
pkgver=2.0.0
pkgrel=0
pkgdesc="implementation of RFC 3986 including validation & authority parsing"
url="https://rfc3986.readthedocs.io/en/latest/"
arch="noarch"
license="Apache-2.0"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-pytest-runner"
source="$pkgname-$pkgver.tar.gz::https://github.com/python-hyper/rfc3986/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	python3 setup.py pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	# find and remove directory containing pyc files
	find "$pkgdir" -name '__pycache__' -type d -exec rm -rf {} +
}

sha512sums="
6ca171868a625d893e928be013f5369be08d631bf13a293f9f6c3dc1099d73808bb44e1cee7a5d9823da9d5cf282a85afd0df853bb342849d5d40a315c7bd7b5  py3-rfc3986-2.0.0.tar.gz
"
